﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Net;
using System.IO;

namespace WebViecLam
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string strAddStudent = "http://localhost:8080/ViecLamService/AddEnrollInformation/";
            strAddStudent += ChucDanh.Text + "/" + MoTa.Text + "/" + YeuCau.Text + "/" + Luong.Text + "/" + "1" + "/" + "25" + "/" + "Name" + "/" + "Toeic 800" + "/" + "1" + "/" + "1" + "/" + "vinh" + "/" + "012345678" + "/" + "vinh.ho@gmail.com";

            byte[] data = Encoding.UTF8.GetBytes(strAddStudent);

            HttpWebRequest httpRequest = (HttpWebRequest)(WebRequest.Create(strAddStudent));
            httpRequest.Method = "POST";
            httpRequest.ContentType = "text/xml";
            httpRequest.ContentLength = data.Length;
            Stream postStream = httpRequest.GetRequestStream();
            postStream.Write(data, 0, data.Length);
        }
    }
}
